Auto merge of #1568 - sondrele:rustc-subcommand, r=alexcrichton
authorbors <bors@rust-lang.org>
Thu, 7 May 2015 19:18:10 +0000 (19:18 +0000)
committerbors <bors@rust-lang.org>
Thu, 7 May 2015 19:18:10 +0000 (19:18 +0000)
commit0d75eb6c8a41329181064618fc2ddeea80bdd380
treeb4e8b8e022af2f9948f72acfcead70ebedb20715
parent1ec2257b679e07bab2e0aa951c1031d6749cc410
parent2cd3c8627622e866256d4c0dfad98224bf490ea9
Auto merge of #1568 - sondrele:rustc-subcommand, r=alexcrichton

## Work in progress
I have followed issue #595 for a while now. I hope that this PR can solve it, after it's done of course.

@alexcrichton: on IRC the other day, you suggested adding a `Vec<String>` to the `CompileOptions`. I have done this, but wasn't sure what the best way to identify the correct `Target` would be, so currently everything gets compiled with the additional arguments.
I considered adding a `Target` structure to the `CompileOptions` as well, and then in `cargo_rustc::build_base_args` only append the arguments if the `Target` matches. What do you think about this? Is there an easier way of figuring out the correct `Target`?

r? @alexcrichton
src/bin/cargo.rs
src/cargo/ops/cargo_rustc/mod.rs